package com.cyy.myapp;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class MyJob {


    @Scheduled(fixedRate = 20000)
    public void printInfoLog(){
        log.info("Info log:,{}", System.currentTimeMillis());
    }


    @Scheduled(fixedRate = 50000)
    public void printErrorLog(){
        log.error("Error log:,{}", System.currentTimeMillis());
    }


}
